package com.ruoyi.hospitalinfo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hospitalinfo.mapper.HospitalInfoMapper;
import com.ruoyi.hospitalinfo.domain.HospitalInfo;
import com.ruoyi.hospitalinfo.service.IHospitalInfoService;

/**
 * 医院信息Service业务层处理
 * 
 * @author zjt
 * @date 2025-01-15
 */
@Service
public class HospitalInfoServiceImpl implements IHospitalInfoService 
{
    @Autowired
    private HospitalInfoMapper hospitalInfoMapper;

    /**
     * 查询医院信息
     * 
     * @param hospitalId 医院信息主键
     * @return 医院信息
     */
    @Override
    public HospitalInfo selectHospitalInfoByHospitalId(Long hospitalId)
    {
        return hospitalInfoMapper.selectHospitalInfoByHospitalId(hospitalId);
    }

    /**
     * 查询医院信息列表
     * 
     * @param hospitalInfo 医院信息
     * @return 医院信息
     */
    @Override
    public List<HospitalInfo> selectHospitalInfoList(HospitalInfo hospitalInfo)
    {
        return hospitalInfoMapper.selectHospitalInfoList(hospitalInfo);
    }

    /**
     * 新增医院信息
     * 
     * @param hospitalInfo 医院信息
     * @return 结果
     */
    @Override
    public int insertHospitalInfo(HospitalInfo hospitalInfo)
    {
        return hospitalInfoMapper.insertHospitalInfo(hospitalInfo);
    }

    /**
     * 修改医院信息
     * 
     * @param hospitalInfo 医院信息
     * @return 结果
     */
    @Override
    public int updateHospitalInfo(HospitalInfo hospitalInfo)
    {
        return hospitalInfoMapper.updateHospitalInfo(hospitalInfo);
    }

    /**
     * 批量删除医院信息
     * 
     * @param hospitalIds 需要删除的医院信息主键
     * @return 结果
     */
    @Override
    public int deleteHospitalInfoByHospitalIds(Long[] hospitalIds)
    {
        return hospitalInfoMapper.deleteHospitalInfoByHospitalIds(hospitalIds);
    }

    /**
     * 删除医院信息信息
     * 
     * @param hospitalId 医院信息主键
     * @return 结果
     */
    @Override
    public int deleteHospitalInfoByHospitalId(Long hospitalId)
    {
        return hospitalInfoMapper.deleteHospitalInfoByHospitalId(hospitalId);
    }
}
